<template>
  <div class="g-loading-spin">
    <span> <i></i><i></i><i></i><i></i> </span>
  </div>
</template>
<script>
export default {
  name: 'DproLoading'
}
</script>

<style lang="less" scoped>
.g-loading-spin {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
}

.g-loading-spin > span {
  display: inline-block;
  position: relative;
  width: 40px;
  height: 40px;
  animation: g-rotate-spin 1.8s infinite linear;
}

.g-loading-spin > span > i {
  position: absolute;
  width: 18px;
  height: 18px;
  transform: scale(0.75);
  border-radius: 100%;
  background: cornflowerblue;
  opacity: 0.3;
  display: block;
  animation: g-rotate-opacity 1s infinite linear;
}

.g-loading-spin > span > i:nth-child(1) {
  left: 0;
  top: 0;
}
.g-loading-spin > span > i:nth-child(2) {
  right: 0;
  top: 0;
  animation-delay: 0.4s;
}
.g-loading-spin > span > i:nth-child(3) {
  right: 0;
  bottom: 0;
  animation-delay: 0.8s;
}
.g-loading-spin > span > i:nth-child(4) {
  left: 0;
  bottom: 0;
  animation-delay: 1.2s;
}

@keyframes g-rotate-spin {
  to {
    transform: rotate(450deg);
  }
}

@keyframes g-rotate-opacity {
  to {
    opacity: 1;
  }
}

</style>